<template>
    <div>
        <p>我的</p>
        <p>store里的count值是{{ globalStore.count }}</p>
        <p>store里的doubleCount值是{{ globalStore.BsCount(2) }}</p>
        <button @click="add">count+1</button>
    </div>
</template>


<script setup lang="ts">
// import { storeToRefs } from "pinia"
import useGlobalStore from "@/store/useGlobalStore";
const globalStore = useGlobalStore();

defineOptions({ name: "mine" });

const add = () => {
    globalStore.$patch({
        count: globalStore.count + 1
    })
}
</script>